CREATE TABLE `SRTrade`.`MsgSRStrategyStateLeggerX` (
`strategyNumber` BIGINT NOT NULL DEFAULT 0 COMMENT 'strategy number',
`accnt` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR trading account',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR client firm',
`spdrSource` ENUM('None','SpdrTicket','SpdrSingle','SRSE','FIX','HedgeTool','TradeHedge','OpenHedge','AutoHedge','Orphan','RiskManager','OrderManager','ManagedOrder','RFQRespSrvr','Legger','SRSEDrop','FixDrop','TicketDrop','SysTest','RFRResponse','AllocOmni','AllocClient','CertGateway','MLegResponse','LeggerX','DropManager','AutoHedgeSrvr','AuctionStrategySrvr','AllocBlockFace','AllocBlockCust','IceChatGateway','EXS2SRC','MLinkResponse','AutoResponderVD','AutoResponderRC','AutoResponderSN','AutoResponderBX','MLink') NOT NULL DEFAULT 'None',
`strategyStatus` ENUM('None','Active','Hold','Closed') NOT NULL DEFAULT 'None',
`strategyState` ENUM('None','Initialized','InvalidLeg','InvalidUpdate','LeggerDone','LimitErr','MktDataErr','SysError','TrySend','TryUpdate','Updated','Except','UserHold','Rejected','MissingLegs','UserClosed','LeggerFilled','LeggerExpired','LegBrkrReject','LegBrkrClosed','LegsClosed','Working') NOT NULL DEFAULT 'None',
`strategyDetail` TINYTEXT NOT NULL DEFAULT '',
`stgyLimitPrice` DOUBLE NOT NULL DEFAULT 0 COMMENT 'strategy limit price (live / adjusted)',
`cumSquareFillQty` INT NOT NULL DEFAULT 0,
`cumPartialFillQty` INT NOT NULL DEFAULT 0,
`avgSquareFillPrc` DOUBLE NOT NULL DEFAULT 0,
`stgyBidPx` DOUBLE NOT NULL DEFAULT 0 COMMENT 'synthetic strategy bid (from individual leg markets)',
`stgyAskPx` DOUBLE NOT NULL DEFAULT 0 COMMENT 'synthetic strategy ask (from individual leg markets)',
`stgyBidSz` DOUBLE NOT NULL DEFAULT 0,
`stgyAskSz` DOUBLE NOT NULL DEFAULT 0,
`stgySurfacePrice` DOUBLE NOT NULL DEFAULT 0 COMMENT 'strategy surface (fair/mid-market) price',
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000',
PRIMARY KEY USING HASH (`strategyNumber`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';